<!DOCTYPE html>
<HTML>
<HEAD><meta name="viewport" content="width=device-width, initial-scale=1">
<Title>PlotArea.setBackground</Title>
<link type='text/css' rel='Stylesheet' href="maxchartapi.css" />
</HEAD>
<body bgcolor="#FFFFFF" text="#000000" topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0">

<p class="heading0">ChartDirector 7.0 (Java Edition)</p>
<p class="heading1"><a href="PlotArea.htm">PlotArea</a>.<wbr>setBackground</p>
<hr class="separator">
<p class="heading2a">Usage</p>
<div class="content">
public void setBackground(int color [, int altBgColor [, int edgeColor ]])
</div>
<p class="heading2">Description</p>
<div class="content">
Sets the background colors and the border color of the plot area.<br><br>
A plot area can have one or two background colors. If it has two background colors, they are drawn alternatively as horizontal bands on the major background grid.<br><br>
ChartDirector Ver 4.0 introduces two new methods <a href="PlotArea.setAltBgColor.htm">PlotArea.setAltBgColor</a> and <a href="PlotArea.set4QBgColor.htm">PlotArea.set4QBgColor</a>. They are used for vertical alternating bands, and for supporting 4 background colors for 4 quadrants.
</div>
<p class="heading2">Arguments</p>
<div class="content">
<div style="width:100%;box-sizing:border-box;">
<table border="1" cellpadding="5" cellspacing="0" width="100%"> 
<tr>
<th width="19%">Argument</th><th width="19%">Default</th><th>Description</th>
</tr>
<tr>
<td>color</td><td>(Mandatory)</td><td>The background color.</td></tr><tr><td>altBgColor</td><td>-1</td><td>The second background color. -1 means there is no second background color.</td></tr><tr><td>edgeColor</td><td>-1</td><td>The border color of the plot area. -1 means to use the default, which is <a href="Chart.LineColor.htm">LineColor</a>. However, if the axes are configured in 4 quadrant mode (see <a href="XYChart.setAxisAtOrigin.htm">XYChart.setAxisAtOrigin</a>), the default will change to <a href="Chart.Transparent.htm">Transparent</a>.</td>
</tr>
</table>
</div>
</div>
<p class="heading2">Return Value</p>
<div class="content">
None
</div>
<br><hr class="separator">
<div class="copyright">&copy; 2022 Advanced Software Engineering Limited. All rights reserved.</div>
</body>
</HTML>
